using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;

using Ample.BLL.Store;
using Ample.DAL.Store;
using Ample.Model;

public partial class OrderCompleted_Page : BasePage
{
  protected void Page_Load(object sender, EventArgs e)
  {
      OrderBO obo = new OrderBO();
      Order order = obo.GetOrderById(Convert.ToInt32(this.Request.QueryString["ID"]));
     
      if (order.Status.Equals(PaymentStatus.Pending.ToString()))
      {
         order.OrderStatuses.Add(new OrderStatus{ AddedBy = this.Profile.UserName, AddedDate = DateTime.Now, Status = PaymentStatus.Confirmed.ToString()});
         obo.UpdateOrderImplicit(order);
      }
  }
}
